﻿using System.Collections.Generic;

namespace OpenCompiler.AST
{
	public class ComplexTypeStatement<T> : TypeStatement<T>
		where T:class
	{
		public ComplexTypeStatement(Statement parent, string name)
			: base(parent,name)
		{
			this.Methods = new List<MethodStatement>();
		}

		public List<MethodStatement> Methods { get; private set; }

		public MethodStatement Method(string name)
		{
			var ms = new MethodStatement(this, name);
			this.Methods.Add(ms);
			return ms;
		}
	}
}
